import request from '@/utils/request'

// 查询法律法规列表
export function listRegulation(query) {
  return request({
    url: '/system/lawRegulation/list',
    method: 'get',
    params: query
  })
}

// 查询法律法规详细
export function getRegulation(lawId) {
  return request({
    url: '/system/lawRegulation/' + lawId,
    method: 'get'
  })
}

// 新增法律法规
export function addRegulation(data) {
  return request({
    url: '/system/lawRegulation',
    method: 'post',
    data: data
  })
}

// 修改法律法规
export function updateRegulation(data) {
  return request({
    url: '/system/lawRegulation',
    method: 'put',
    data: data
  })
}

// 删除法律法规
export function delRegulation(lawId) {
  return request({
    url: '/system/lawRegulation/' + lawId,
    method: 'delete'
  })
}

// 获取法律法规关注列表
export function getAttentionRegulationList() {
  return request({
    url: '/app/lawRegulation/attention',
    method: 'get'
  })
}
